<template>
  <div>
    <!-- <Unit /> -->
    <!-- <button @click="change">切筒</button>
    <button @click="showNoticeAnimation">走动画</button>
    <unitControl :currentUnit="currentUnit" :isUnitInit="isUnitInit" ref="twoUnit" /> -->
    <animation />
  </div>
</template>

<script setup>
import { ref, onMounted } from 'vue'
import Unit from '@/components/sei-dimensionalityTab/index.vue'
import unitControl from '@/components/unitControl1/index.vue'
import animation from '@/components/animation/animation.vue'

const twoUnit = ref(null)

const isUnitInit = ref(false)

onMounted(() => {
  console.log(123)
  // 获取 HTML 根节点
  const htmlElement = document.documentElement

  // 设置 data-theme 属性为 'haier'
  htmlElement.setAttribute('data-theme', 'haier')

  setTimeout(() => {
    isUnitInit.value = true
  }, 1500)
})

const currentUnit = ref('UP')

function change() {
  currentUnit.value = currentUnit.value === 'UP' ? 'DOWN' : 'UP'
}

function showNoticeAnimation() {
  twoUnit.value.startNoticeAnimation()
}
</script>

<style scoped lang="less"></style>
